<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p v-if="gender === 1">性别：男</p>
        <p v-else>性别：女</p>
        <hr>
        
    </div>
    
    <script src="./vue.js"></script>

    <script>
        // v-show 适合频繁切换场景
        // v-if 要么显示，要么隐藏，不频繁切换的场景
        const app = new Vue({
            el: '#app',
            data: {
                gender:1
            }
        })
    </script>
    
</body>
</html>